﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Workflows.Components.TextMining.Collapse
{
    /// <summary>
    /// in the range of (0,100]
    /// </summary>
    [Serializable]
    public struct ModePercentile : IComparable
    {
        public int Percentile;
        public int Count;   // this should be same between percentile groups
        public double AverageFrequency;
        public double SD;
        public List<string> DistinctValues;

        public int CompareTo(object obj)
        {
            if (obj.GetType() == typeof(ModePercentile))
            {
                ModePercentile otherModePct = (ModePercentile)obj;
                return this.Percentile.CompareTo(otherModePct.Percentile);
            }
            else
                return 0;
        }
    }
}
